<template>
  <div id="404">
    <page-layout>
      <a-card>
        <a-result status="404" title="404" sub-title="页面找不到了">
          <template #extra>
            <router-link to="/">
              <a-button type="primary" @click="backHomePage"> 返回首页 </a-button>
            </router-link>
          </template>
        </a-result>
      </a-card>
    </page-layout>
    <!--    <page-footer></page-footer>-->

  </div>
</template>
<script>
import {useRouter} from "vue-router";

export default {
  data() {
    return {}
  },
  setup() {
    const router = useRouter();

    // 返回首页并清楚缓存
    const backHomePage = async function () {
      //清除localStorage的全部缓存
      window.localStorage.clear()
      await router.push("/login")
    };

    // 授权码发送

    return {
      backHomePage
    };
  },
};
</script>
